%latex.default(object = result, title = "", file = paste0("tables/",     filename, ".tex"), label = paste0("tb_", type), caption = caption,     insert.bottom = note, first.hline.double = FALSE, rowname = rownames,     cgroup = c("$n = 200$", "", "$n = 1000$", "", "$n = 200$",         "", "$n = 1000$"), n.cgroup = c(2, 1, 2, 2, 2, 1, 2),     cgroupTexCmd = "", colheads = clabels, rgroup = c("Correct PS model",         "Misspecified PS model"), n.rgroup = c(rep(nrow(res1),         2)), longtable = FALSE, center = "centering")%
\begin{table}[!tbp]
\caption{Simulation results: Quadratic outcome model 2\label{tb_quad2}} 
{\centering
\begin{tabular}{lrrcrcrrcrrcrrcrcrr}
\hline
\multicolumn{1}{l}{\ }&\multicolumn{2}{c}{\ $n = 200$}&\multicolumn{1}{c}{\ }&\multicolumn{1}{c}{\ }&\multicolumn{1}{c}{\ }&\multicolumn{2}{c}{\ $n = 1000$}&\multicolumn{1}{c}{\ }&\multicolumn{2}{c}{\ }&\multicolumn{1}{c}{\ }&\multicolumn{2}{c}{\ $n = 200$}&\multicolumn{1}{c}{\ }&\multicolumn{1}{c}{\ }&\multicolumn{1}{c}{\ }&\multicolumn{2}{c}{\ $n = 1000$}\tabularnewline
\cline{2-3} \cline{7-8} \cline{13-14} \cline{18-19}
\multicolumn{1}{l}{}&\multicolumn{1}{c}{Bias}&\multicolumn{1}{c}{RMSE}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{Bias}&\multicolumn{1}{c}{RMSE}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{Bias}&\multicolumn{1}{c}{RMSE}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{Bias}&\multicolumn{1}{c}{RMSE}\tabularnewline
\hline
{\bfseries Correct PS model}&&&&&&&&&&&&&&&&&&\tabularnewline
~~\textbf{nDBW}&$-0.70$&$  5.75$&&$$&&$-0.19$&$  2.63$&&$$&$$&&$ -2.19$&$ 6.25$&&$$&&$ -0.50$&$ 2.78$\tabularnewline
~~MLE&$-0.76$&$ 14.18$&&$$&&$-0.09$&$  5.78$&&$$&$$&&$ -0.45$&$19.10$&&$$&&$  0.16$&$ 8.00$\tabularnewline
~~CBPS&$ 1.57$&$  6.72$&&$$&&$ 0.32$&$  2.93$&&$$&$$&&$  1.65$&$ 7.56$&&$$&&$  0.34$&$ 3.35$\tabularnewline
~~Calibrated weighting&$-0.98$&$  5.73$&&$$&&$-0.21$&$  2.60$&&$$&$$&&$ -1.40$&$ 6.32$&&$$&&$ -0.32$&$ 2.95$\tabularnewline
~~Entropy balancing&$-3.64$&$  6.57$&&$$&&$-3.02$&$  3.89$&&$$&$$&&$ -3.63$&$ 6.87$&&$$&&$ -3.00$&$ 4.01$\tabularnewline
~~True propensity score&$-0.46$&$ 26.59$&&$$&&$ 0.33$&$ 12.16$&&$$&$$&&$ -0.60$&$30.81$&&$$&&$ -0.20$&$13.66$\tabularnewline
~~Unweighted&$ 6.75$&$  9.34$&&$$&&$ 6.93$&$  7.52$&&$$&$$&&$ -6.90$&$ 8.88$&&$$&&$ -6.88$&$ 7.33$\tabularnewline
~~\textbf{nDBW DR}&$-1.60$&$  6.20$&&$$&&$-0.39$&$  2.69$&&$$&$$&&$ -3.03$&$ 6.61$&&$$&&$ -0.71$&$ 2.86$\tabularnewline
~~MLE DR&$-1.11$&$  7.63$&&$$&&$-0.12$&$  3.43$&&$$&$$&&$ -1.53$&$ 9.63$&&$$&&$ -0.17$&$ 4.80$\tabularnewline
~~CBPS DR&$-1.33$&$  6.87$&&$$&&$-0.23$&$  3.16$&&$$&$$&&$ -1.75$&$ 7.36$&&$$&&$ -0.33$&$ 3.74$\tabularnewline
~~Calibrated weighting DR&$-1.50$&$  6.38$&&$$&&$-0.32$&$  2.84$&&$$&$$&&$ -2.10$&$ 6.51$&&$$&&$ -0.49$&$ 3.06$\tabularnewline
~~Entropy balancing DR&$-4.30$&$  7.49$&&$$&&$-3.42$&$  4.36$&&$$&$$&&$ -5.09$&$ 7.81$&&$$&&$ -4.02$&$ 4.86$\tabularnewline
~~True propensity score DR~~&$-1.26$&$  7.52$&&$$&&$-0.18$&$  3.54$&&$$&$$&&$ -1.87$&$10.22$&&$$&&$ -0.31$&$ 5.16$\tabularnewline
~~Imputation&$-1.11$&$  7.12$&&$$&&$-0.26$&$  3.16$&&$$&$$&&$-11.23$&$12.50$&&$$&&$-10.89$&$11.16$\tabularnewline
\hline
{\bfseries Misspecified PS model}&&&&&&&&&&&&&&&&&&\tabularnewline
~~\textbf{nDBW}&$ 5.57$&$  9.08$&&$$&&$ 6.27$&$  7.02$&&$$&$$&&$ -7.14$&$ 9.20$&&$$&&$ -4.12$&$ 4.94$\tabularnewline
~~MLE&$23.21$&$109.17$&&$$&&$42.96$&$259.51$&&$$&$$&&$-10.78$&$16.41$&&$$&&$-10.53$&$11.55$\tabularnewline
~~CBPS&$ 7.26$&$ 11.09$&&$$&&$ 3.79$&$  5.21$&&$$&$$&&$ -4.53$&$ 8.87$&&$$&&$ -8.22$&$ 8.92$\tabularnewline
~~Calibrated weighting&$ 4.67$&$  8.46$&&$$&&$ 5.46$&$  6.30$&&$$&$$&&$ -6.40$&$ 8.63$&&$$&&$ -5.40$&$ 6.05$\tabularnewline
~~Entropy balancing&$ 2.30$&$  7.29$&&$$&&$ 3.15$&$  4.41$&&$$&$$&&$ -9.16$&$10.71$&&$$&&$ -8.50$&$ 8.88$\tabularnewline
~~True propensity score&$ 0.39$&$ 26.63$&&$$&&$-0.44$&$ 11.70$&&$$&$$&&$  0.24$&$31.11$&&$$&&$  0.06$&$14.22$\tabularnewline
~~Unweighted&$ 7.05$&$  9.65$&&$$&&$ 6.94$&$  7.54$&&$$&$$&&$ -7.00$&$ 9.00$&&$$&&$ -6.85$&$ 7.34$\tabularnewline
~~\textbf{nDBW DR}&$ 4.31$&$  8.24$&&$$&&$ 5.18$&$  6.03$&&$$&$$&&$ -6.63$&$ 8.71$&&$$&&$ -4.70$&$ 5.38$\tabularnewline
~~MLE DR&$10.72$&$ 31.50$&&$$&&$26.53$&$186.73$&&$$&$$&&$ -7.23$&$10.21$&&$$&&$ -6.63$&$ 7.37$\tabularnewline
~~CBPS DR/BRDR&$ 5.69$&$  9.57$&&$$&&$ 6.97$&$  7.83$&&$$&$$&&$ -7.15$&$ 9.54$&&$$&&$ -7.01$&$ 7.61$\tabularnewline
~~Calibrated weighting DR&$ 4.67$&$  8.46$&&$$&&$ 5.46$&$  6.30$&&$$&$$&&$ -6.40$&$ 8.63$&&$$&&$ -5.40$&$ 6.05$\tabularnewline
~~Entropy balancing DR&$ 2.30$&$  7.29$&&$$&&$ 3.15$&$  4.41$&&$$&$$&&$ -9.16$&$10.71$&&$$&&$ -8.50$&$ 8.88$\tabularnewline
~~True propensity score DR~~&$-1.04$&$  7.63$&&$$&&$-0.25$&$  3.47$&&$$&$$&&$ -1.90$&$10.36$&&$$&&$ -0.31$&$ 5.24$\tabularnewline
~~Imputation&$-0.99$&$  7.21$&&$$&&$-0.23$&$  3.15$&&$$&$$&&$-11.37$&$12.64$&&$$&&$-10.88$&$11.17$\tabularnewline
\hline
\end{tabular}}
\parbox{0.99\textwidth}
		{Notes: This simulation compares the performance of various methods 
		for estimating propensity scores and (inverse probability) weights 
		by investigating combinations of six versions of the true outcome model 
		(linear~1, linear~2, quadratic~1, quadratic~2, exponential~1, and exponential~2)
		and two versions of coefficients for the true propensity score model (type~A and B)
		with the two different numbers of observations ($n = 200$ and $n = 1000$).
		For each estimation method, I use two propensity score model specifications 
		(correct and misspecified) and report the bias and RMSE for each in the table.}\end{table}
